package com.example.jdbcdemo.mapper;

import com.example.jdbcdemo.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface OrderMapper {
    List<Order> queryOrderList();//返回列表

    Order queryOrderById(int id);//根据id查询

    List<Order> queryOrderByGroupId(int groupId);//根据标识组id查询

    List<Order> queryOrderByProductId(int productId);//根据商品id查询所有相关订单

    int addOrder(Order order);//增

    int updateOrder(Order order);//改

    int deleteOrder(int id);//删
}
